package com.taoge.p4.common.exception;

import com.taoge.p4.common.errorCode.BaseErrorCode;

public class BusinessException extends BaseException {
    public BusinessException(String message) {
        super(message);
    }

//    public BusinessException(IndexBannerErrorCode errorCode) {
//        this(errorCode.getCode(), errorCode.getMsg());
//    }
//
//    public BusinessException(SecurityErrorCode errorCode) {
//        this(errorCode.getCode(), errorCode.getMsg());
//    }

//    public BusinessException(SecurityErrorCode errorCode, Object... args) {
//        this(errorCode.getCode(), errorCode.getMsg(args));
//    }

    public BusinessException(BaseErrorCode errorCode) {
        this(errorCode.getCode(), errorCode.getMsg());
    }

    public BusinessException(BaseErrorCode errorCode, Object... args) {
        this(errorCode.getCode(), errorCode.getMsg(args));
    }

    public BusinessException(int code, String msg) {
        super(code, msg);
    }

    public BusinessException(int code, String msg, String... args) {
        super(code, msg);
    }

    public BusinessException(int code, String msg, Object data) {
        super(code, msg, data);
    }
}
